<%@include file="menu/util.jsp" %>
<%@page contentType="application/xml; charset=iso-8859-1" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<c:set var="pointer" value="${requestScope.pointer}" />
<c:set var="dimensionalCuts" value="${requestScope.dimensionalCuts}" />
<c:set var="rootDimensionalCuts" value="${requestScope.rootDimensionalCuts}" />
<c:set var="cutMembers" value="${requestScope.cutMembers}"/>
<c:set var="dataComparators" value="${requestScope.dataComparators}"/>
<c:set var="comparators" value="${requestScope.comparators}"/>
<c:set var="dimensionalCutDates" value="${requestScope.dimensionalCutDates}"/>
<c:set var="dimensionalCutDatesData" value="${requestScope.dimensionalCutDatesData}"/>
<c:set var="pointerScores" value="${requestScope.pointerScores}"/>
<c:set var="rangeDates" value="${requestScope.rangeDates}"/>
<c:set var="cutMembersString" value="${requestScope.cutMembersString}"/>



<fmt:bundle basename="app">
    <xml>
        <c:forEach var="date" items="${rangeDates}">
            <fmt:formatDate var="dateXML" type="Date" value="${date}" />
            <register date='${dateXML}'>
                <c:forEach var="dimensionalCut" items="${rootDimensionalCuts}">
                    <c:set var="cutPointerScore" value="${pointerScores[dimensionalCut]}" />
                    <c:set var="pointerScore" value="${cutPointerScore[date]}" />
                    <c:set var="cutMemberString" value="${cutMembersString[dimensionalCut]}" />

                    <fmt:formatNumber pattern="### ###.##" maxFractionDigits="2" type="number" groupingUsed="false" var="score" value="${pointerScore*100}" />

                    <data cut="${cutMemberString}" score="${fn:replace(score,',','.')}"></data>
                </c:forEach>
            </register>
        </c:forEach>

        <c:forEach var="dimensionalCut" items="${rootDimensionalCuts}">
            <c:set var="cutMemberString" value="${cutMembersString[dimensionalCut]}" />
            <graphics dimensionalCut="${cutMemberString}" ></graphics>
        </c:forEach>

        <scoreInfo unit="(%)" ></scoreInfo>

    </xml>
</fmt:bundle>